< previous page page_314 next page >

Page 314
first had to create a test HTML file outside the Visual Basic IDE and then launch Internet Explorer manually. Fortunately, Visual Basic 6.0 has improved this process. You can now automatically launch Internet Explorer and debug your ActiveX control code from within the Visual Basic IDE.
If you still have the project group open, remove the Standard EXE project from the group. Simply right-click Project1 in the Project Explorer window, and choose Remove Project from the context menu. The only remaining project should be the Address control.
Start the Address control project by pressing F5 or clicking the Visual Basic Start button. If you have Internet Explorer installed, it should be automatically launched, as shown in Figure 14.7.
0314-01.jpg
Figure 14.7
Visual Basic 6.0 makes testing controls a
snap by automatically launching the browser.
After you finish testing the control in Internet Explorer, close the browser and stop the Visual Basic project.
note.gif The Debugging tab of the Project Properties dialog box determines how ActiveX components are launched when you press F5. For more information about it, see Chapter 16, "Classes: Reusable Components." square.gif

sarrow.gifSee "Working with Multiple Projects," p. 235
Compiling Your Control
So far, you learned how to test the control project running as code in the design environment. However, to use the control outside the design environment (that is, on a user's PC), you must compile your source code into an OCX file and package it for distribution. Others can then install the OCX file on their systems and use your control in their own projects, regardless of whether they are working with a programming language, a Web page, or some other development tool.

 
< previous page page_314 next page >